<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CM_byShops.aspx.cs" Inherits="WebMenu.CM_byShops" %>
<%@ Register TagPrefix="cr" TagName="WUC_NavTabs" Src="~/WUC_NavTabs.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_LeftPanel" Src="~/WUC_LeftPanel.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_RightPanel" Src="~/WUC_RightPanel.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_Footer" Src="~/WUC_Footer.ascx" %>
<%@ Register TagPrefix="cr" TagName="WUC_HtmlHeadTag" Src="~/WUC_HtmlHeadTag.ascx" %>
<%@ Register Src="WUC_ToggleButton.ascx" TagName="WUC_ToggleButton" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<%--<html xmlns="http://www.w3.org/1999/xhtml" >--%>
<head runat="server">
    <title>CheckMenu - Search by Shops </title>
    <cr:WUC_HtmlHeadTag id="WUC_HtmlHeadTag_02" runat="server" />    
</head>


    <script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAXg-1e7LbaB0NNB4KY0h0-BQWFt-7OBZKMPMlsVYvuUdvLO58RBSi6mMmr-RK5Y90BBnpyvt7UFoIfA"></script>

    <script type="text/javascript"> google.load("maps", "2.x"); </script>

    <script type="text/javascript"> 

    function drawGmap() { 
        var dLat = document.getElementById("hidLatitude").value;
        var dLong = document.getElementById("hidLongitude").value;
        var sAddress = document.getElementById("hidShopDetails").value;
        var map = new google.maps.Map2(document.getElementById("map"));
        map.setUIToDefault();
        var point = new GLatLng(dLat, dLong);
        map.addOverlay(new GMarker(point));
        map.setCenter(new google.maps.LatLng(dLat, dLong), 15);         
        var shtml = "100 <b>He</b>llo";
        map.openInfoWindowHtml(map.getCenter(), sAddress);  //map.openInfoWindow(map.getCenter(), document.createTextNode(hidText.value));

    } 
    function displaymessage()    { alert("Hello World!");    }
    </script>

<body  onunload="GUnload()">


<div id="L1background" > 
<div id="L2Header" >    

	<div class="floatleft">		<img class="imgMain" src="images/CMLogo01.gif" width="250" alt="Logo"/> </div>

    <div id="L3HeaderMenu" >
  <ul id="navbut" >
<cr:WUC_NavTabs id="WUC_NavTabs1" runat="server" />      
</ul>
	
    </div>

</div>
 <div id="HorizSeparator" >    </div>

<div class="container">
<div class="header"></div>
<div class="left">
<cr:WUC_LeftPanel id="WUC_LeftPanel1" runat="server" />    
</div>
<div class="right">
<cr:WUC_RightPanel id="WUC_RightPanel1" runat="server" />    
</div>
<div class="content"> 

    <form id="form1" runat="server">
    <fieldset><legend>Choose Menu from Shop</legend>
    <div> 
        <table width="100%"><tr align="center">
        <td>Suburb <br/>
            <asp:dropdownlist id="suburbDropList"  AutoPostBack="True" runat="server" >
            <asp:ListItem Text="(Select a Suburb)" Value="" />     </asp:dropdownlist>
        </td>
        <td>Cuisine <br/>
            <asp:dropdownlist id="cuisineDropList" AutoPostBack="True" runat="server" >
            <asp:ListItem Text="(Select a Cuisine)" Value="" /> </asp:dropdownlist>
        </td> 
        <td>Shop Name<br/>
            <asp:dropdownlist id="shopDropList" AutoPostBack="True" runat="server" >
            <asp:ListItem Text="(Select a Shop)" Value="" /> 
            </asp:dropdownlist>&nbsp;<br />
        </td>
        
        </tr></table>
    </div>
    </fieldset>
    
    <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        
<hr />

        <table>
        <tr>
        <td style="vertical-align: top ">

Shop Details &nbsp; &nbsp;
        <asp:Button ID="butShopUpdate" runat="server" Text="Get Details" Visible="false"  OnClick="butShopUpdate_Click" />
        &nbsp;
        <uc1:WUC_ToggleButton ID="WUC_ToggleBtn_ShopDetails" runat="server" toggleState="On" OnText="Show" OffText="Hide"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        
        <asp:DataList ID="shopDataList" runat="server" CellPadding="4" ForeColor="#333333" >
            <ItemTemplate>
            <b><i>
            <%# DataBinder.Eval(Container.DataItem, "name") %><br />
            </i></b>
            <%# DataBinder.Eval(Container.DataItem, "address") %><br />
            <%# DataBinder.Eval(Container.DataItem, "suburb") %>
            <%# DataBinder.Eval(Container.DataItem, "state") %>
            <%# DataBinder.Eval(Container.DataItem, "pcode") %><br />
            <%# DataBinder.Eval(Container.DataItem, "phone") %>  
            <%# DataBinder.Eval(Container.DataItem, "mobile") %><br />
            <%# DataBinder.Eval(Container.DataItem, "openHours") %>
                
            </ItemTemplate>
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingItemStyle BackColor="White" />
            <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        </asp:DataList>
        </td>

        <td style="vertical-align: top ">
        Map Display  &nbsp;&nbsp;
        <input id="butMap" runat="server" type="button" value="Draw Map" onclick="drawGmap()" />
        <input id="hidLatitude" runat="server" type="hidden" />&nbsp;
        <input id="hidLongitude" runat="server" type="hidden" />
        <input id="hidShopDetails" runat="server"  type="hidden" />
        <div id="map" runat="server"  style="width: 400px; height: 400px" visible="true">    </div>   
        
        </td>
        </tr>
        </table>        

<hr />
Menu  &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
        <asp:Button ID="butMenuUpdate" runat="server" OnClick="butMenuUpdate_Click" Text="Refresh" />
        <asp:GridView ID="gvMenu" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
            AllowSorting="True"  
            OnRowDataBound="Grid_RowDataBound"
            OnPageIndexChanging="gvMenu_PageIndexChanging" OnSorting="gvMenu_Sorting">
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />

            <columns>
                <asp:boundfield readonly="true">
                    <itemstyle  Width="0">  </itemstyle>
                </asp:boundfield> 
            </columns>
            
        </asp:GridView>
        <br />        
        <asp:TextBox ID="tb_Debug" runat="server" Height="78px" TextMode="MultiLine" Width="482px"></asp:TextBox><br />
        <br />
        <br />
<%--        Test Menu<asp:GridView ID="TestMenu" runat="server" CellPadding="4" ForeColor="#333333"
            OnPageIndexChanging="TestMenu_PageIndexChanging" OnSorting="TestMenu_Sorting"
            GridLines="None" AllowSorting="True">
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#EFF3FB" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>--%>
    </div>
    
    </form>


</div>  <!-- content -->
</div>  <!-- container -->



 
<div class="HorizSeparator" >    </div>
<div id="L2Footer" >    
<cr:WUC_Footer id="Footer3" var1="hello" runat="server" /> 
</div> 

</div> 




</body>
</html>
